package com.sgcc.fj.pmos.e_fj_home.activity;

import android.view.View;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.sgcc.fj.pmos.arouter.home.HomeArouterPath;
import com.sgcc.fj.pmos.common.base.MvpBaseActivity;
import com.sgcc.ln.pmos.common.widget.TitleBar;
import com.sgcc.pmos.nativesdk.R;
import com.sgcc.fj.pmos.e_fj_home.bean.RetailBean;
import com.sgcc.fj.pmos.e_fj_home.presenter.RetailPresenter;

/**
 * 电量变更--分时段
 */
@Route(path = HomeArouterPath.HOME_RETAILQA_DETAIL)
public class RetailQaDetailActivity extends MvpBaseActivity {

    private static final String TAG = "RetailQaDetail";
    private TitleBar mTitleBar;
    RetailBean.RetailListDTO bean;
    TextView title_txt, content_txt;

    @Override
    protected RetailPresenter createPresenter() {
        return new RetailPresenter();
    }

    @Override
    protected void receiveIntentExtras() {
        super.receiveIntentExtras();
        bean = (RetailBean.RetailListDTO) getIntent().getSerializableExtra("bean");
    }


    @Override
    protected int getContentViewLayoutID() {
        return R.layout.activity_retail_detail;
    }

    @Override
    protected void initViews() {
        super.initViews();
        mTitleBar = (TitleBar) findViewById(R.id.title_bar);
        mTitleBar.setTitle("零售百科");
        mTitleBar.setRightIcon(R.mipmap.go_main, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                goMainActivity();
            }
        });
        title_txt = findViewById(R.id.title_txt);
        content_txt = findViewById(R.id.content_txt);
        if (bean != null) {
            title_txt.setText(bean.getQuestions());
            content_txt.setText(bean.getAnswer());
        }

    }


}
